import 'package:flutter/material.dart';

extension NumDivider on num {
  Divider divider([Color? color]) {
    return Divider(
      thickness: toDouble(),
      height: toDouble(),
      color: color ?? const Color(0xFFECEFF5),
    );
  }

  VerticalDivider vDivider([Color? color]) {
    return VerticalDivider(
      thickness: toDouble(),
      width: toDouble(),
      color: color ?? const Color(0xFFECEFF5),
    );
  }
}

extension ValueDivider on Divider {
  Divider copyWith({double? height, Color? color}) {
    return Divider(
      height: height ?? this.height,
      thickness: height ?? this.height,
      color: color ?? this.color,
    );
  }
}

extension ValueVerticalDivider on VerticalDivider {
  VerticalDivider copyWith({double? width, Color? color}) {
    return VerticalDivider(
      width: width ?? this.width,
      thickness: width ?? this.width,
      color: color ?? this.color,
    );
  }
}
